import request from "@/utils/request";

// 更新 modifyAvatar API 函数，添加 userType 和 userId 参数
export function modifyAvatar(file, userType, userId) {
    const formData = new FormData();
    formData.append('avatar', file);
    formData.append('userType', userType);
    formData.append('userId', userId);

    return request.request({
        url: '/upload/modifyAvatar',
        method: 'post',
        data: formData,
        headers: { 'Content-Type': 'multipart/form-data' }
    });
}

export default modifyAvatar;
